<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/10/6 0006
  Time: 下午 1:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html>
<head>
    <title>资金统计</title>
    <script src="../../js/jquery-3.3.1.min.js" charset="utf-8"></script>
    <script src="../../js/cookie/jquery.cookie.js" charset="utf-8"></script>
    <script src="../../layui-v2.2.5/layui/layui.js" charset="utf-8"></script>
    <script src="/js/layui/form_verify.js"></script>
    <link rel="stylesheet" href="../../layui-v2.2.5/layui/css/layui.css" media="all">
    <style>
        table{
            border-collapse: collapse;
        }
        td{width:180px;padding:5px;border:1px solid black;}
        tr{display:block;}

    </style>
</head>
<body>

<span  style="text-align: center;display:block; font-size: 30px">${activityName}</span>
<div>

<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:-32px;float:right;margin-right: 100px"  href="javascript:location.replace(location.href);" title="刷新">
    <i class="layui-icon" style="line-height:30px">ဂ</i>
</a>
</div>
<div style="margin-top: 1%">
<table>
    <tr>
        <td><span>交易总笔数</span></td> <td><span>${statisticsInfo.count}</span></td>
        <td><span>交易总金额</span></td> <td><span>${statisticsInfo.sumMoney}</span></td>
        <td><span>返利总金额</span></td> <td><span>${statisticsInfo.rebate}</span></td>
        <td><span>提现总金额</span></td> <td><span>${statisticsInfo.withdrawMoney}</span></td>
    </tr>
    <tr>
        <td><span>微信手续费</span></td> <td><span>${statisticsInfo.wxMoney}</span></td>
        <td><span>平台服务费</span></td> <td><span>${statisticsInfo.serviceMoney}</span></td>
        <td><span>拓客服务费</span></td> <td><span>${statisticsInfo.talkMoney}</span></td>
        <td><span>退款金额</span></td> <td><span>${statisticsInfo.rundMoney}</span></td>

    </tr>
    <tr>
        <td><span>浮动资金</span></td> <td><span>${statisticsInfo.floatMoney}</span></td>
        <td><span>剩余金额</span></td> <td><span>${statisticsInfo.residueMoney}</span></td>
        <td><span><button class="layui-btn" onclick="withdraw()">申请提现</button></span></td>
        <td><span><button class="layui-btn" onclick="withdrawLog()">提现记录</button></span></td>
        <%--<td><span><button class="layui-btn">返利记录</button></span></td>--%>
    </tr>
    <tr>
        <td><span>推广消耗费用</span></td> <td><span>${statisticsInfo.shareMoney}</span></td>
        <td><span><button class="layui-btn" onclick="generalizeInfo()">推广详情</button></span></td>
        <td><span><button class="layui-btn" onclick="balanceRecharge()">余额转为推广费</button></span></td>
        <td><span><button class="layui-btn" onclick="wxNative()">微信充值</button></span></td>
    </tr>
</table>
</div>
<script>

    layui.use('layer', function(){
        var layer = layui.layer;
    });

    /*申请提现*/
    function withdraw() {
        layer.open({
            title:'申请提现',
            type: 2,
            content: '/group/goGroupWithdrawLogin?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }
    /*账户资金转为推广金额*/
    function balanceRecharge() {
        layer.open({
            title:'账户资金转为推广金额',
            type: 2,
            content: '/group/balanceRecharge?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }


    /*微信充值*/
    function wxNative() {
        layer.open({
            title:'微信充值',
            type: 2,
            content: '/group/wxNative?activityId=${activityId}&orgId=${orgId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["80%","80%"]
        });
    }
    /*
    *  推广详情  generalizeInfo
    * */
    function generalizeInfo() {
        layer.open({
            title:'推广详情',
            type: 2,
            content: '/group/generalizeInfo?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["80%","80%"]
        });
    }



    /*提现记录*/

    function withdrawLog() {
        layer.open({
            title:'提现记录',
            type: 2,
            content: '/group/toGroupWithdrawLogs?activityId=${activityId}',
            offset: '5px',
            shade:[0.8, '#393D49'],
            shadeClose:true,
            area: ["90%","90%"]
        });
    }
</script>

</body>
</html>
